'''
Created on Oct 14, 2014

@author: azhelezny
'''
from pip._vendor.distlib.compat import raw_input

#nucleotide = 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC'

nucleotide = raw_input('Enter the chain:')

adenine = nucleotide.count('A')
thymine = nucleotide.count('T')
cytosine = nucleotide.count('C')
guanine = nucleotide.count('G')

print(format(adenine), format(cytosine), format(guanine),format(thymine))